﻿<html>
<head>
<meta charset="utf-8">
<style>
body
{
font-family:Arial;
font-size:12px;
color:#333333;
}
h1
{
font-size:20px;
text-align:center;
font-weight:bold;
color:#999999;
}
h2
{
font-size:14px;
text-align:center;
color:#cccccc;
}
</style>
</head>
<body>
<div id="load">
<h1>Kis türelmet...</h1>
<h2>Kérlek várj amíg kommunikálunk a facebookkal...</h2>

</div>
<div id="login" style="display:none;">
<h1>Az alkalmazás használatához jelentkezz be!</h1>
<h2>Ehhez kattints az alábbi gombra:</h2>
<center>
<fb:login-button max_rows="1" size="small" width="398px" scope="public_profile,email" show_faces="false" auto_logout_link="false" onlogin="finishLogin()"></fb:login-button>
</center>
</div>
<div id="gui" style="display:none;">
<h1>Etap állása</h1><br><br><br>
<hr>
<center>
<table><tr><td><fb:like-box style="vertical-align: top;" href="https://www.facebook.com/EdemmesterGamerBlog" colorscheme="light" show_faces="false" header="false" stream="false" show_border="false"></fb:like-box>
</td><td>
<fb:facepile style="vertical-align: top;" href="https://www.facebook.com/EdemmesterGamerBlog" action="like" width="350" max_rows="1" colorscheme="light" size="medium" show_count="true"></fb:facepile></td></tr></table>
</center>
</div>
<script>
function finishLogin()
{
FB.api('/me', function(response) {
top.location.href='http://edemmester.hu/infohw/loginCallback.php?id=' + response.id;
});
}

function finishLoad()
{
document.getElementById("load").style.display="none";
document.getElementById("login").style.display="none";
document.getElementById("gui").style.display="block";

}

  window.fbAsyncInit = function() {
    FB.init({
      appId      : '369549486561274',
      xfbml      : true,
      version    : 'v2.1'
    });
    
FB.getLoginStatus(function(response) {
if(response.status!="connected")
{
document.getElementById("load").style.display="none";
document.getElementById("login").style.display="block";
}
else
{
finishLoad();
}
});
  };

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/hu_HU/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>
</body>